Skip to content

Team - VenueForge - Phase1 MVP#76

Open
akhintheruvath wants to merge 128 commits into
WeCode-Community-Dev:mainfrom
akhintheruvath:main
Open

Team - VenueForge - Phase1 MVP#76
akhintheruvath wants to merge 128 commits into
WeCode-Community-Dev:mainfrom
akhintheruvath:main

Conversation

@akhintheruvath

@akhintheruvath akhintheruvath commented Jun 29, 2026

Copy link
Copy Markdown

Phase Category

  • Phase 1: MVP Submission (Base Foundation)
  • Phase 2/3: Feature Implementation or Modularization
  • Phase 4: Scalability Optimization
  • General (Documentation, Bugfix, Chore, etc.)

Tech Stack (For Phase 1 MVP Submissions)

  • Frontend: ReactJs, TailwindCSS
  • Backend: NodeJs with ExpressJs
  • Database: MongoDB

Checklist:

  • I have read the Contribution Guidelines.
  • My code follows the community spirit and standards of the WeCode community.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings or errors.

AI Disclosure

  • I did NOT use AI tools to generate this code.
  • I used AI tools (e.g., Copilot, ChatGPT, Claude) to help write this code, and I have fully reviewed, tested, and understand the output.

akhintheruvath and others added 30 commits May 30, 2026 14:15
getting started - basic frontend setup
feat(backend): add public venue & category read APIs
Added Venue Owner, Admin Pages
Established API Data To Load On Frontend
ArjunO-008 and others added 17 commits June 20, 2026 20:58
Completed The Full UI/UX Design For Owner Page
Replace the separate Add Venue form with a create-draft-then-edit flow:
"Add Venue" now creates an empty DRAFT and redirects to the edit page,
which autosaves field changes (debounced ~2s) with a saving/saved
indicator and a "Continue Editing Later" action.

Backend:
- Implement venueOwnerCreateVenue (empty DRAFT) and venueOwnerUpdateVenue
  (partial autosave, validators skipped — submit is the validation gate)
- Add GET /venueOwner/venues/:id (venueOwnerGetVenueById) for fetching an
  owner's own venue in any status
- Replace VENUE_OWNER_VENUE_PROJECTION with OWNER_HIDDEN_FIELDS exclusion

Frontend:
- Remove AddVenuePage; VenueForm handles both create and edit
- Rename owner service fns (getOwnerVenues -> getVenueOwnerVenues, etc.)
  and add createDraftVenue / getVenueOwnerVenueById
Implement venueOwnerSubmitVenue: verify ownership, gate on
SUBMITTABLE_STATUSES, then check all REQUIRED_VENUE_FIELDS are filled
before moving DRAFT -> PENDING or EDIT_DRAFT -> CHANGES_PENDING. Returns
400 with missingFields when the draft is incomplete.

Add REQUIRED_VENUE_FIELDS and missingRequiredVenueFields() to shared.js.
Preserve the structured error body on the API client so callers can read
response data, and surface missingFields inline in VenueForm by flagging
each input and focusing the first. Show a confirmation toast on submit.
venue add, edit & submit flow - venue owner page
Admin Page : Sidebar and Venue approval page added
Replace the 501 stub in venueOwnerDeleteVenue with a real hard delete
gated to DRAFT and EDIT_DRAFT statuses. Add a DELETABLE_STATUSES constant
and a shared statusNotAllowedMessage() helper so the guard and its 400
message share one source of truth across submit/delete/edit actions.

Frontend: hide the delete button unless the venue is DRAFT/EDIT_DRAFT,
tailor the confirm dialog and success toast for discard-edit vs delete,
and drop the alert() now that the api client surfaces errors as toasts.
…lers

Replace the hardcoded status-gate 400 messages in venueOwnerSubmitVenue
and venueOwnerUpdateVenue with statusNotAllowedMessage(), so the allowed
status list and its error text stay in sync with the guards.
Editing a live APPROVED venue never mutates it in place. Instead it works
on an EDIT_DRAFT copy (editOf -> original), which is submitted as
CHANGES_PENDING for admin re-approval.

Backend:
- Add POST /venueOwner/getVenueForEdit/:id — idempotently creates/resumes the
  EDIT_DRAFT copy, 409s when a CHANGES_PENDING copy is already in review
- Add buildEditDraftSeed() in shared to seed a copy from the original
- Mark APPROVED venues in the owner list with editStatus so the UI can
  relabel/guard the Edit button without a per-row request

Frontend:
- getVenueForEdit() service call
- EditVenuePage resolves the editable copy for APPROVED venues, autosaves and
  submits against the copy id while keeping the original id in the URL, and
  shows a blocked state on 409
- VenueTable shows "Resume edit" for in-progress copies and disables Edit with
  an info tooltip while edits await review
- Replace placeholder admin login with real auth (form + /auth/login)
- Guard admin routes with RequireAuth (role: admin)
- Wire up admin logout via auth context
- Add seedAdmin script to create an admin user
venue owner side and admin side updates
@akhintheruvath akhintheruvath changed the title Team - VenueForge Team - VenueForge - Phase1 MVP Jun 29, 2026
akhintheruvath and others added 12 commits July 5, 2026 01:14
Backend:
- GET /admin/venues — paginated review queue filtered by review status
  (PENDING = new venues, CHANGES_PENDING = submitted edits), sorted by
  submission time; supports countOnly for tab badges
- Mount /api/admin behind authenticate + requireRole(ADMIN)
- Add REVIEW_STATUSES and HISTORY_ACTIONS constants
- Add version counter and editHistory audit log to the venue model

Frontend:
- Replace mock AdminVenueApprovals data with live API calls
- Two tabs (New Venues / Venue Edits) with count badges, URL-persisted
  active tab and sort direction, and pagination
- Add admin.service.js (getAdminVenues, getAdminVenuesCount)
Add GET /admin/venues/:id returning a single venue in a review status
(PENDING or CHANGES_PENDING); non-review statuses are treated as not
found. The response includes owner contact fields and, for edit copies,
`editOf` linking to the live listing.

Replace the hardcoded mock data in AdminVenueDetails with a fetch from
the new endpoint, including loading/error states and a "View live venue
details" link for CHANGES_PENDING edit copies.
feat: add admin venue detail endpoint and wire up review page
Add an Amenity collection and expose GET /amenities for the frontend.
Wire amenities into the venue schema as an array of refs, make it a
required editable field, and populate amenity labels on every venue
read via a new VENUE_POPULATE spec. Render a multiselect checkbox grid
in VenueForm to set and pre-check a venue's amenities.
feat: add venue amenities with multiselect in venue form
Added Amentities and Categories in Admin Side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants